//
//  BaseWebViewController.swift
//  DSHCMerchant
//
//  Created by 罗德良 on 2018/5/14.
//  Copyright © 2018年 袋鼠好车. All rights reserved.
//

import UIKit
import WebKit

class BaseWebViewController: BaseViewController {

    var loadUrl = ""
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        let web = WKWebView( frame: CGRect(x:0, y:0,width:kScreenWidth, height:kScreenHeight))
        /// 设置访问的URL
        let url = NSURL(string: loadUrl)
        /// 根据URL创建请求
        let requst = NSURLRequest(url: url! as URL)
        /// 设置代理
        //        web.uiDelegate = self
        web.navigationDelegate = self as? WKNavigationDelegate
        /// WKWebView加载请求
        web.load(requst as URLRequest)
        self.view.addSubview(web)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
